# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=gnome-documents
pkgver=3.26.1
pkgrel=1
pkgdesc="A document manager application for GNOME"
url="https://wiki.gnome.org/Apps/Documents"
arch=(i686 x86_64)
license=(GPL)
groups=(gnome-extra)
depends=(evince gjs gtk3 gnome-desktop gnome-online-accounts libgdata tracker-miners libzapojit
         webkit2gtk gnome-online-miners librsvg libgepub)
makedepends=(gobject-introspection git gnome-common)
optdepends=('libreoffice-fresh: Support for Libreoffice document types')
_commit=fb73c9a3b51f3287df01eec863af1428a25ebb63  # tags/3.26.1^0
source=("git+https://git.gnome.org/browse/gnome-documents#commit=$_commit"
        "git+https://git.gnome.org/browse/libgd")
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname

  git submodule init
  git config --local submodule.libgd.url "$srcdir/libgd"
  git submodule update

  NOCONFIGURE=1 ./autogen.sh
}
  

build() {
  cd $pkgname
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --libexecdir=/usr/lib/$pkgname
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
